﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static O.M.Production.Domain.EnumModel;

namespace O.M.Production.Domain.Entity
{
    /// <summary>
    /// 工序流程关系表
    /// </summary>

    [SugarTable("working_procedure")]
    public class working_procedure
    {
        /// <summary>
        /// 工序流程关系id
        /// </summary>
        [SugarColumn(ColumnDescription = "工序流程关系id", IsPrimaryKey = true, IsIdentity = true)]
        public int working_procedure_id { get; set; }

        /// <summary>
        /// 工单编号
        /// </summary>
        [SugarColumn(ColumnDescription = "工单编号", Length = 100)]
        public string? work_order_id { get; set; }

        /// <summary>
        /// 工艺流程编号
        /// </summary> 
        [SugarColumn(ColumnDescription = "工序流程编号", Length = 100)]
        public string? process_flow_id { get; set; }

        /// <summary>
        /// 工序编号
        /// </summary> 
        [SugarColumn(ColumnDescription = "工序编号", Length = 100)]
        public string? working_id { get; set; }

        /// <summary>
        /// 工作名称
        /// </summary> 
        [SugarColumn(ColumnDescription = "工作名称", Length = 100)]
        public string? working_name { get; set; }

        /// <summary>
        /// 加工顺序
        /// </summary> 
        [SugarColumn(ColumnDescription = "加工顺序")]
        public int job_order { get; set; }

        /// <summary>
        /// 工艺流程
        /// </summary> 
        [SugarColumn(ColumnDescription = "工艺流程", Length = 100)]
        public string? process_flow { get; set; }

        /// <summary>
        /// 负责人
        /// </summary> 
        [SugarColumn(ColumnDescription = "负责人", Length = 100)]
        public Person_In_Charge? person_in_charge { get; set; }

        /// <summary>
        /// 所在部门
        /// </summary> 
        [SugarColumn(ColumnDescription = "所在部门", Length = 100)]
        public Department? department { get; set; }

        /// <summary>
        /// 计划开始时间
        /// </summary> 
        [SugarColumn(ColumnDescription = "计划开始时间")]
        public DateTime? planned_start_time { get; set; }

        /// <summary>
        /// 计划结束时间
        /// </summary> 
        [SugarColumn(ColumnDescription = "计划结束时间")]
        public DateTime? planned_end_time { get; set; }

        /// <summary>
        /// 实际开始时间
        /// </summary> 
        [SugarColumn(ColumnDescription = "实际开始时间", IsNullable = true)]
        public DateTime? actual_start_time { get; set; }

        /// <summary>
        /// 实际结束时间
        /// </summary>
        [SugarColumn(ColumnDescription = "实际结束时间", IsNullable = true)]
        public DateTime? actual_end_time { get; set; }

        /// <summary>
        /// 计划产量
        /// </summary> 
        [SugarColumn(ColumnDescription = "计划产量")]
        public int designed_output { get; set; }

        /// <summary>
        /// 完工数量
        /// </summary> 
        [SugarColumn(ColumnDescription = "完工数量", IsNullable = true)]
        public int completed_quantity { get; set; }

        /// <summary>
        /// 合格数量
        /// </summary> 
        [SugarColumn(ColumnDescription = "合格数量", IsNullable = true)]
        public int qualified_quantity { get; set; }

        /// <summary>
        /// 合格率
        /// </summary> 
        [SugarColumn(ColumnDescription = "合格率", IsNullable = true)]
        public decimal percent_of_pass { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [SugarColumn(ColumnDescription = "状态",IsNullable =true)]
        public int state { get; set; }
    }
}
